Get (
self,
name,
recurse=None,
)
Return a sequence representing SEF child name , w/optional recursion
If this is a service, return elements of type name name . If this
is an element, return the values() of the feature named name .
If this is a feature, return the concatenation of applying Get(name)
to self.values() .
If the recurse flag is true, or name ends in an asterisk
("*" ), then reapply Get(name,recurse) recursively to the
resulting sequence and append the results until no more reuslts are
obtained.
The returned sequence must be an object which implements the
IQuerying interface by (effectively) mapping its Get() and
Where() methods over its contents.
|
Where ( self, criteria=None )
Filter contents by criteria predicate
If this is a service, return elements meeting criteria . If this
is an element, return a sequence which is either empty or contains
self if self meets criteria . If this is a feature, return those
elements of self.values() which meet criteria .
criteria must be a callable object taking one parameter and
returning a true or false value, indicating whether the passed item
is acceptable.
The returned sequence must be an object which implements the
IQuerying interface by (effectively) mapping its Get() and
Where() methods over its contents.
|